const bigFromTransmit = {
    name: 'bigFormTransmit',
    data() {
        return {
            mrUrl: 'http://192.168.0.180:8081/test/test',
            method: 'post',
            show: false,
            submitData: null
        }

    },
    methods: {
        submit(url, method, data) {
            console.log(url)
            console.log(method)
            console.log(data)
            this.mrUrl = url
            this.method = method || 'post'
            let submitData = []
            for (let key in data) {
                let item = {
                    name: key,
                    value: data[key]
                }
                submitData.push(item)
            }
            this.submitData = submitData
            console.log(submitData)
            // setTimeout(()=>{
            //
            // },100)
            this.show=true
            this.$nextTick(()=>{
                this.$refs.formTR.submit()
                this.show=false
            })

        },


    },
    template: `
        <template>
            <form ref="formTR" :action="mrUrl" :method="method" v-show="false">

                <template v-for="item in submitData">
                    <input v-model="item.value" :name="item.name"/>
                </template>
            </form>
        </template>
    `
}
export default bigFromTransmit